f = open('okk.txt', encoding='utf-8')
import  re

avgs = []

for line in f:
    l=re.findall("\d+",line)
    l1=list(map(int,l))
    if len(l1) > 0: 
        avg = sum(l1)/len(l1)
    else:
        avg = ""
    avgs.append(avg)

f.close()

out = open("okk-out.txt", mode='w')

for n in avgs:
    out.write(str(n) + '\n')

out.close()
